PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Text Style Constants

You can use the following constants, also listed in Table A-2, to specify text style characteristics:

all caps, all lowercase, bold, condensed, expanded, hidden, italic, outline,
plain, shadow, small caps, strikethrough, subscript, superscript, underline

The following script gets the text style from the text body of an open AppleWorks word processing document:

tell application "AppleWorks"
    -- Get style of text from open document.
    style of text body of document "Draft Report"
end tell

--result:
{class:text style info, on styles:{plain}, off styles:{italic, underline,
outline, shadow, condensed, expanded, strikethrough, superscript, subscript,
superior, inferior, double underline}}

Depending on the application, you can get and set text style characteristics for individual characters, words, paragraphs, or the entire text.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)